import request from '@/api/request'
import { IPaginationForm, ResponseFormat, ResponseFormatWithRows } from '@/types/http'

// 条件查询
export const queryData = (data: IPaginationForm): Promise<ResponseFormatWithRows> => {
  return request.post('/attempt-customer/find', data)
}

export const queryDataAll = (data: IPaginationForm): Promise<ResponseFormatWithRows> => {
  return request.post('/attempt-customer/findAll', data)
}

// 新增一条数据
export const createData = (data): Promise<ResponseFormat> => {
  return request.post('/attempt-customer/create', data)
}

// 更新
export const updateData = (data): Promise<ResponseFormat> => {
  return request.post('/attempt-customer/update', data)
}

// 删除
export const deleteData = (params): Promise<ResponseFormat> => {
  return request.get('/attempt-customer/update', { params })
}
